'use strict';

module.exports = appInfo => {
  const config = exports = {};
  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1544410733842_1353';
  
  // 跨域设置
  config.security = {
    csrf: {
      enable: false
    },
    domainWhiteList: ['*']
  }
  config.cors = {
    origin: '*',
    allowMethods: 'GET, POST, HEAD, PUT, DELETE, PATH'
  }

  //数据库配置
  config.postgre = {
    user: 'imatrix',
    password: 'D74GM8hHTU28y2QU',
    database: 'imatrix-cube',
    host: 'dev.quantcube.com.cn/'
  }
  
  //redis设置
  config.redisKey = 'IMATRIX_ADMIN_USER_'
  config.redis = {
    client: {
      port: 6679,
      host: 'dev.quantcube.com.cn',
      password: '9zgo9474BY3UmTcC',
      db: 0
    }
  }

  // add your config here
  config.middleware = ['authorization'];
  //修改日志级别
  config.logger = {
    level: 'DEBUG',
  }

  return config;
};
